/**
 * @author xuyh0817
 * @email xuyh0817@foxmail.com
 * @date 2022-02-16 01:41
 * @version 2.0.0
 * @doc todo
 * @website todo
 * @remark  如果要分发源码，需在本文件顶部保留此文件头信息！！
 */
import { COMPONENT_TYPE } from '../../constants'

export default [
  {
    id: '1',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'value',
      rules: [],
      label: '默认值',
      extra: 'value(v-model) 多值用,分隔',
    },
    attrs: {
      maxLength: 200,
      type: 'text',
      allowClear: true,
      placeholder: '请输入默认值'
    }
  },
  {
    id: '2',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'disabled',
      rules: [],
      label: '禁用状态',
      extra: '是否禁用状态，默认为 false,整组失效',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '3',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'allowClear',
      rules: [],
      label: '清除图标',
      extra: '可以点击清除图标删除内容，默认为 false',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '4',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'showSearch',
      rules: [],
      label: '搜索框',
      extra: '在下拉中显示搜索框(仅在单选模式下生效)',
    },
    attrs: {
      checked: true
    }
  },
  {
    id: '5',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'multiple',
      rules: [],
      label: '多选',
      extra: '支持多选（当设置 treeCheckable 时自动变为 true）',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '6',
    type: COMPONENT_TYPE.INPUT_NUMBER,
    formItem: {
      prop: 'maxTagCount',
      rules: [],
      label: '显示tag',
      extra: '最多显示多少个 tag',
    },
    attrs: {
      value: 10,
      placeholder: '请输入显示tag'
    }
  },
  {
    id: '7',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'treeDefaultExpandAll',
      rules: [],
      label: '展开节点',
      extra: '默认展开所有树节点',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '8',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'placeholder',
      rules: [],
      label: '提示内容',
      extra: 'placeholder 提示内容',
    },
    attrs: {
      maxLength: 100,
      value: '请选择',
      type: 'text',
      allowClear: true,
      placeholder: '请输入'
    }
  },
  {
    id: '9',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'searchPlaceholder',
      rules: [],
      label: '提示内容',
      extra: '搜索框默认文字',
    },
    attrs: {
      maxLength: 100,
      value: '请输入',
      type: 'text',
      allowClear: true,
      placeholder: '请输入'
    }
  },
  {
    id: '10',
    type: COMPONENT_TYPE.RADIO_BUTTON,
    formItem: {
      prop: 'size',
      rules: [],
      label: '开关大小',
      extra: '开关大小，可选值：default small large',
    },
    attrs: {
      buttonStyle: 'solid',
      value: 'default',
      children: [
        {
          value: 'large',
          label: 'large'
        },
        {
          value: 'default',
          label: 'default'
        },
        {
          value: 'small',
          label: 'small'
        }
      ]
    }
  },
  {
    id: '11',
    type: COMPONENT_TYPE.TEXTAREA,
    formItem: {
      prop: 'treeData',
      rules: [],
      label: '可选项',
      extra: '指定可选项,可用setFormItemAttrs方法进行动态设置',
    },
    attrs: {
      autoSize: {
        minRows: 6
      },
      value: '',
      maxLength: 2000,
      allowClear: true,
      placeholder: '请输入可选项'
    }
  },
  {
    id: '12',
    type: COMPONENT_TYPE.TEXTAREA,
    formItem: {
      prop: 'associations',
      rules: [],
      label: '关联赋值',
      extra: '指定可选项中的属性项,进行动态添加到表单数据中',
    },
    attrs: {
      autoSize: {
        minRows: 4
      },
      value: '',
      maxLength: 1000,
      allowClear: true,
      placeholder: '请输入关联赋值项'
    }
  }
]
